# include <bits/stdc++.h>

const int32_t maxn = 100005;

int32_t n, x, a, b;

int main () {
	
	freopen ("nim.in", "r", stdin);
	freopen ("nim.out", "w", stdout);
	
	std::cin >> n >> x >> a >> b;
	
	if (a <= b)
		return std::cout << 1 << '\n', 0;
	
	return 0;
}
